home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_randamb2.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  82 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_RandAmb2.cog
  4. #
  5. # [TRM] && [DS]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     message        pulse
  14.  
  15.     thing        soundPos0        nolink
  16.     thing        soundPos1        nolink
  17.     thing        soundPos2        nolink
  18.     thing        soundPos3        nolink
  19.     thing        soundPos4        nolink
  20.     
  21.     sector      startAmbients
  22.     sector      stopAmbients
  23.  
  24.     sound        wav0=gen_cave_a1.wav    local
  25.     sound        wav1=gen_cave_a2.wav    local
  26.     sound        wav2=gen_cave_a3.wav    local
  27.     sound        wav3=gen_cave_a4.wav    local
  28.     sound        wav4=gen_cave_a5.wav    local
  29.     sound        wav5=gen_cave_a6.wav    local
  30.  
  31.     float        minDist=-1        local
  32.     float        maxDist=-1        local
  33.     float        volume=0.6        local
  34.     
  35.     int            sndNum            local
  36.     int            numPos=5        local
  37.     int            count           local
  38.  
  39. end
  40.  
  41. # ========================================================================================
  42.  
  43. code
  44.  
  45. entered:
  46.  
  47.     if(GetSenderRef() == startAmbients)
  48.     {
  49.         setpulse(2.0);
  50.     }
  51.     
  52.     if(GetSenderRef() == stopAmbients)
  53.     {
  54.         setpulse(0.0);
  55.     }
  56.     
  57.     return;
  58.  
  59. # ========================================================================================
  60.  
  61. pulse:
  62.  
  63.     SetPulse(0.0);
  64.     sndNum = RandBetween(0, 5);
  65.     
  66.     for (count = 0; count < numPos; count = count+1) 
  67.     {
  68.         if (soundPos0[count] >= 0) 
  69.         {
  70.             PlaySoundThing(wav0[sndnum], soundPos0[count], volume, minDist, maxDist, 0);
  71.         }
  72.     }
  73.     
  74.     SetPulse(2.0);
  75.     
  76.     return;
  77.  
  78. # ========================================================================================
  79.  
  80. end
  81.  
  82.